home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
ddj0897.zip
/
DYN401.ZIP
/
examples
/
exam34
/
main.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-27
|
2KB
|
95 lines
/*
*
* This source code is CONFIDENTIAL and
* PROPRIETARY to Algorithms Corporation. Unauthorized
* distribution, adaptation or use may
* be subject to civil and criminal penalties.
*
* Copyright (c) 1993 Algorithms Corporation
* 3020 Liberty Hills Drive
* Franklin, TN 37064
*
* ALL RIGHTS RESERVED.
*
*
*
*/
#include "generics.h"
main(int argc, char *argv[])
{
object a, b, c;
InitDynace(&argc);
/* I must use the garbage collector because I am not manually
disposing of the objects I will be creating. */
gSetMemoryBufferArea(Dynace, 50000L);
a = gNewWithInt(ShortInteger, 7);
b = gNewWithDouble(DoubleFloat, 3.131);
gPrint(a, stdoutStream);
gPrint(b, stdoutStream);
c = gFormatNumber(a, "", 0, 2);
gPrint(c, stdoutStream);
c = gFormatNumber(b, "", 0, 2);
gPrint(c, stdoutStream);
b = gNewWithDouble(DoubleFloat, 2345678.87);
c = gFormatNumber(b, "CD", 0, 2);
gPrint(c, stdoutStream);
a = gToday(Date);
c = gFormatDate(a, "%N/%D/%y");
gPrint(c, stdoutStream);
c = gFormatDate(a, "%N/%D/%Y");
gPrint(c, stdoutStream);
c = gFormatDate(a, "%W %M %d%s, %Y %T");
gPrint(c, stdoutStream);
c = gFormatDate(a, "%m. %d, %Y");
gPrint(c, stdoutStream);
c = gFormatDate(a, "%W the %d%s of %M");
gPrint(c, stdoutStream);
return 0;
}
/*
*
* This source code is CONFIDENTIAL and
* PROPRIETARY to Algorithms Corporation. Unauthorized
* distribution, adaptation or use may
* be subject to civil and criminal penalties.
*
* Copyright (c) 1993 Algorithms Corporation
* 3020 Liberty Hills Drive
* Franklin, TN 37064
*
* ALL RIGHTS RESERVED.
*
*
*
*/